package com.banyuan.service.impl;

import com.banyuan.dao.IAccountDao;
import com.banyuan.domain.Account;
import com.banyuan.service.IAccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AccountServiceImpl implements IAccountService {

    @Autowired
    private IAccountDao accountDao;

    @Override
    public int insert(Account account) {
       return accountDao.insert(account);
    }

    @Override
    public int update(Account account) {
       return accountDao.update(account);
    }

    @Override
    public int delete(Integer id) {
        return accountDao.delete(id);
    }

    @Override
    public List<Account> selectAll() {
        return accountDao.selectAll();
    }

    @Override
    public Account selectById(Integer id) {
        return accountDao.selectById(id);
    }
}
